//查找异常网站：http://stackoverflow.com/

class Person implements Cloneable{
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Test {


    private static void testMethod(){

        System.out.println("testMethod");

    }

    public static void main(String[] args) {

        ((Test)null).testMethod();

    }
    public static void test3(int[] c) throws CloneNotSupportedException {
        if(c == null) {
            throw new CloneNotSupportedException();
        }
    }

    public static void main3(String[] args) throws CloneNotSupportedException{
        try {
            test3(null);
        }catch (CloneNotSupportedException e){

            System.out.println("捕捉到了CloneNotSupportedException异常。=，进行处理");
        }

        System.out.println("正常的逻辑");
    }

    public static void test1 (int[] a) {
        if(a == null) {
            throw new NullPointerException();//自定义异常
        }
    }

    public static void test2(int[] b) throws CloneNotSupportedException {
        if(b == null) {
            throw new CloneNotSupportedException();//被中断了
        }
    }

    public static void main2(String[] args) throws CloneNotSupportedException {
        test1(null);
        test2(null);
    }

    public static void main1(String[] args) throws CloneNotSupportedException {
        System.out.println(10 / 0);
        int[] array = null;
        System.out.println(array.length);//空指针异常

        Person person = new Person();
        Person person1 = (Person) person.clone();
    }
}
